const crypto = require("crypto");

//加密对象 --> 返回加密成功后的数据
module.exports = function (pwd, key = "mi yao") {
	const hash = crypto.createHash("sha256", key);
	hash.update(pwd);
	const data = hash.digest("hex");
	return data;
};
